 <?php
include 'db.php';

$username=$_GET['u'];
$password=md5($_GET['p']);
$ip=$_SERVER['REMOTE_ADDR'];
  $q=mysql_query("SELECT * FROM login WHERE username='$username' AND password='$password'");
  while($data = mysql_fetch_row($q)){
if($data[0] != "")
{
$a=mysql_query("UPDATE login set `ip`='{$ip}' WHERE `username`='{$username}'");
echo "Verified";
break;
}
}
 // Closing connection
mysql_close($link);
?>
